package com.icart.entities;

import javax.persistence.*;
import java.sql.Date;
import java.sql.Timestamp;

@Entity
@Table(name = "cu_custcar", schema = "ams", catalog = "")
public class CuCustcarEntity {
    private long custcarid;
    private Long custid;
    private String carno;
    private String cartype;
    private String mobile;
    private String engineno;
    private String vin;
    private String brand;
    private Date regdate;
    private Date certdate;
    private long carkind;
    private Date lastmtdate;
    private Date nextmtdate;
    private Long insucomid;
    private String linkman;
    private String linktel;
    private String forcedinsuid;
    private String comminsuid;
    private Date insuexpirydate;
    private Date yearveridate;
    private Timestamp creattime;
    private Long creatchn;
    private Long creator;

    @Id
    @Column(name = "custcarid")
    public long getCustcarid() {
        return custcarid;
    }

    public void setCustcarid(long custcarid) {
        this.custcarid = custcarid;
    }

    @Basic
    @Column(name = "custid")
    public Long getCustid() {
        return custid;
    }

    public void setCustid(Long custid) {
        this.custid = custid;
    }

    @Basic
    @Column(name = "carno")
    public String getCarno() {
        return carno;
    }

    public void setCarno(String carno) {
        this.carno = carno;
    }

    @Basic
    @Column(name = "cartype")
    public String getCartype() {
        return cartype;
    }

    public void setCartype(String cartype) {
        this.cartype = cartype;
    }

    @Basic
    @Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Basic
    @Column(name = "engineno")
    public String getEngineno() {
        return engineno;
    }

    public void setEngineno(String engineno) {
        this.engineno = engineno;
    }

    @Basic
    @Column(name = "vin")
    public String getVin() {
        return vin;
    }

    public void setVin(String vin) {
        this.vin = vin;
    }

    @Basic
    @Column(name = "brand")
    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    @Basic
    @Column(name = "regdate")
    public Date getRegdate() {
        return regdate;
    }

    public void setRegdate(Date regdate) {
        this.regdate = regdate;
    }

    @Basic
    @Column(name = "certdate")
    public Date getCertdate() {
        return certdate;
    }

    public void setCertdate(Date certdate) {
        this.certdate = certdate;
    }

    @Basic
    @Column(name = "carkind")
    public long getCarkind() {
        return carkind;
    }

    public void setCarkind(long carkind) {
        this.carkind = carkind;
    }

    @Basic
    @Column(name = "lastmtdate")
    public Date getLastmtdate() {
        return lastmtdate;
    }

    public void setLastmtdate(Date lastmtdate) {
        this.lastmtdate = lastmtdate;
    }

    @Basic
    @Column(name = "nextmtdate")
    public Date getNextmtdate() {
        return nextmtdate;
    }

    public void setNextmtdate(Date nextmtdate) {
        this.nextmtdate = nextmtdate;
    }

    @Basic
    @Column(name = "insucomid")
    public Long getInsucomid() {
        return insucomid;
    }

    public void setInsucomid(Long insucomid) {
        this.insucomid = insucomid;
    }

    @Basic
    @Column(name = "linkman")
    public String getLinkman() {
        return linkman;
    }

    public void setLinkman(String linkman) {
        this.linkman = linkman;
    }

    @Basic
    @Column(name = "linktel")
    public String getLinktel() {
        return linktel;
    }

    public void setLinktel(String linktel) {
        this.linktel = linktel;
    }

    @Basic
    @Column(name = "forcedinsuid")
    public String getForcedinsuid() {
        return forcedinsuid;
    }

    public void setForcedinsuid(String forcedinsuid) {
        this.forcedinsuid = forcedinsuid;
    }

    @Basic
    @Column(name = "comminsuid")
    public String getComminsuid() {
        return comminsuid;
    }

    public void setComminsuid(String comminsuid) {
        this.comminsuid = comminsuid;
    }

    @Basic
    @Column(name = "insuexpirydate")
    public Date getInsuexpirydate() {
        return insuexpirydate;
    }

    public void setInsuexpirydate(Date insuexpirydate) {
        this.insuexpirydate = insuexpirydate;
    }

    @Basic
    @Column(name = "yearveridate")
    public Date getYearveridate() {
        return yearveridate;
    }

    public void setYearveridate(Date yearveridate) {
        this.yearveridate = yearveridate;
    }

    @Basic
    @Column(name = "creattime")
    public Timestamp getCreattime() {
        return creattime;
    }

    public void setCreattime(Timestamp creattime) {
        this.creattime = creattime;
    }

    @Basic
    @Column(name = "creatchn")
    public Long getCreatchn() {
        return creatchn;
    }

    public void setCreatchn(Long creatchn) {
        this.creatchn = creatchn;
    }

    @Basic
    @Column(name = "creator")
    public Long getCreator() {
        return creator;
    }

    public void setCreator(Long creator) {
        this.creator = creator;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CuCustcarEntity that = (CuCustcarEntity) o;

        if (custcarid != that.custcarid) return false;
        if (carkind != that.carkind) return false;
        if (custid != null ? !custid.equals(that.custid) : that.custid != null) return false;
        if (carno != null ? !carno.equals(that.carno) : that.carno != null) return false;
        if (cartype != null ? !cartype.equals(that.cartype) : that.cartype != null) return false;
        if (mobile != null ? !mobile.equals(that.mobile) : that.mobile != null) return false;
        if (engineno != null ? !engineno.equals(that.engineno) : that.engineno != null) return false;
        if (vin != null ? !vin.equals(that.vin) : that.vin != null) return false;
        if (brand != null ? !brand.equals(that.brand) : that.brand != null) return false;
        if (regdate != null ? !regdate.equals(that.regdate) : that.regdate != null) return false;
        if (certdate != null ? !certdate.equals(that.certdate) : that.certdate != null) return false;
        if (lastmtdate != null ? !lastmtdate.equals(that.lastmtdate) : that.lastmtdate != null) return false;
        if (nextmtdate != null ? !nextmtdate.equals(that.nextmtdate) : that.nextmtdate != null) return false;
        if (insucomid != null ? !insucomid.equals(that.insucomid) : that.insucomid != null) return false;
        if (linkman != null ? !linkman.equals(that.linkman) : that.linkman != null) return false;
        if (linktel != null ? !linktel.equals(that.linktel) : that.linktel != null) return false;
        if (forcedinsuid != null ? !forcedinsuid.equals(that.forcedinsuid) : that.forcedinsuid != null) return false;
        if (comminsuid != null ? !comminsuid.equals(that.comminsuid) : that.comminsuid != null) return false;
        if (insuexpirydate != null ? !insuexpirydate.equals(that.insuexpirydate) : that.insuexpirydate != null)
            return false;
        if (yearveridate != null ? !yearveridate.equals(that.yearveridate) : that.yearveridate != null) return false;
        if (creattime != null ? !creattime.equals(that.creattime) : that.creattime != null) return false;
        if (creatchn != null ? !creatchn.equals(that.creatchn) : that.creatchn != null) return false;
        if (creator != null ? !creator.equals(that.creator) : that.creator != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (custcarid ^ (custcarid >>> 32));
        result = 31 * result + (custid != null ? custid.hashCode() : 0);
        result = 31 * result + (carno != null ? carno.hashCode() : 0);
        result = 31 * result + (cartype != null ? cartype.hashCode() : 0);
        result = 31 * result + (mobile != null ? mobile.hashCode() : 0);
        result = 31 * result + (engineno != null ? engineno.hashCode() : 0);
        result = 31 * result + (vin != null ? vin.hashCode() : 0);
        result = 31 * result + (brand != null ? brand.hashCode() : 0);
        result = 31 * result + (regdate != null ? regdate.hashCode() : 0);
        result = 31 * result + (certdate != null ? certdate.hashCode() : 0);
        result = 31 * result + (int) (carkind ^ (carkind >>> 32));
        result = 31 * result + (lastmtdate != null ? lastmtdate.hashCode() : 0);
        result = 31 * result + (nextmtdate != null ? nextmtdate.hashCode() : 0);
        result = 31 * result + (insucomid != null ? insucomid.hashCode() : 0);
        result = 31 * result + (linkman != null ? linkman.hashCode() : 0);
        result = 31 * result + (linktel != null ? linktel.hashCode() : 0);
        result = 31 * result + (forcedinsuid != null ? forcedinsuid.hashCode() : 0);
        result = 31 * result + (comminsuid != null ? comminsuid.hashCode() : 0);
        result = 31 * result + (insuexpirydate != null ? insuexpirydate.hashCode() : 0);
        result = 31 * result + (yearveridate != null ? yearveridate.hashCode() : 0);
        result = 31 * result + (creattime != null ? creattime.hashCode() : 0);
        result = 31 * result + (creatchn != null ? creatchn.hashCode() : 0);
        result = 31 * result + (creator != null ? creator.hashCode() : 0);
        return result;
    }
}
